<?php
function lilina_user_display($args)
{
    if(!xarSecurityCheck('OverviewLilina')) return;
    if (!xarVarFetch('id', 'id', $id, XARVAR_PREP_FOR_DISPLAY)) return;
    if (!xarVarFetch('objectid', 'str:1:', $objectid, $id, XARVAR_NOT_REQUIRED)) return;
    extract($args);

    xarModAPIFunc('lilina',
                  'user',
                  'redirect');


    $data = xarModAPIFunc('lilina',
        'user',
        'get_story',
        array('id' => $id));

    xarVarSetCached('Blocks.lilina', 'id', $id); 
    xarTplSetPageTitle(xarVarPrepForDisplay($data['title'])); 

    $data['id'] = $id;
    $data['module'] = 'lilina';
    $data['itemtype'] = 1;
    $data['itemid'] = $id;
    $data['returnurl'] = xarModURL('lilina',
                                   'user',
                                   'display',
                                   array('id' => $id));
    $hooks = xarModCallHooks('item', 'display', $id, $data);
    if (empty($hooks)) {
        $data['hooks'] = '';
    } elseif (is_array($hooks)) {
        $data['hooks'] = join('',$hooks);
    } else {
        $data['hooks'] = $hooks;
    }
    $data['authid'] = xarSecGenAuthKey();
    return $data;
}
?>